{% extends "@PimNotification/Email/notification.txt.twig" %}

{% block emailMessage %}
    {% if jobExecution.status.unsuccessful %}
        Akeneo completed your "{{ jobExecution.jobInstance.label }}" job with errors.
    {% else %}
        Akeneo successfully completed your "{{ jobExecution.jobInstance.label }}" job.
    {% endif %}

    Started on {{ jobExecution.startTime|date("Y-m-d") }} at {{ jobExecution.startTime|date("H:i:s")  }}.
    Ended on {{ jobExecution.endTime|date("Y-m-d") }} at {{ jobExecution.endTime|date("H:i:s")  }}.

    Results:
    {% for stepExecution in jobExecution.stepExecutions %}
      - {{ stepExecution.stepName|trans }} [{{ stepExecution.status }}]
    {% endfor %}

    {% if akeneo_pim_url is not empty %}
        You can view full summary at :
        {{ akeneo_pim_url ~ '/#' ~ path('akeneo_job_process_tracker_details', {'id': jobExecution.id}) }}
    {% else %}
        You should set the AKENEO_PIM_URL environment variable to view summary.
    {% endif %}
{% endblock %}
